<?php

namespace App\Api\Requests;


class AdminMenuRequest extends Request
{
    protected static $skipCallbacks = ['icon'];

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title'     => 'required',
            'path'      => "required",
            'parent_id' => 'different:id',
        ];
    }

    public function messages()
    {
        return [
            'parent_id.different' => '父级菜单栏选择无效'
        ];
    }
}
